package com.deceen.common.utils;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * @author zhuchunfeng
 * @date 2019/7/19 13:16
 */
@Slf4j
@Component
public class RedisClientUtil {
    private static final Map<String, String> keyMapToken = new HashMap<>();

    public void storeToken(String key, String token) {
        keyMapToken.put(key, token);
    }

    public String getToken(String key) {
        return keyMapToken.get(key);
    }

    public void removeToken(String key) {
        keyMapToken.remove(key);
    }
}
